More and more mobile phones have an infrared module or may be provided with an infrared module using an interface. The infrared module is a hardware circuit combination having a function of connecting to another control device and an infrared remote control function, and includes an infrared emitter, a drive circuit, and a communications circuit. A mobile phone may serve as a remote control using an infrared module in order to remotely control a television, an air conditioner, and the like.
Usually, a mobile phone initially has no remote control function, and can remotely control a to-be-remotely-controlled device only after establishing a pairing with the device. Generally, a pairing process includes the following steps.
Step 1: A user enters a model or a brand of a to-be-remotely-controlled device on a mobile phone.
Step 2: Select, according to the model or the brand entered by the user, an infrared code from an infrared code library stored in the mobile phone.
Step 3: Encode an infrared signal according to the selected infrared code, and send the encoded infrared signal to the to-be-remotely-controlled device.
Step 4: When the to-be-remotely-controlled device responds correctly, the user determines that matching succeeds. Otherwise, go back to step 1 to repeat the pairing process of step 1 to step 4.
A disadvantage of the pairing process includes that a user needs to manually enter a model or a brand of a device, and needs to manually determine whether matching succeeds, which results in a low automation degree.